.class final Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$8;
.super Ljava/lang/Object;
.source "MeasuresDialogs.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs;->deleteAreas(Ljava/util/List;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic val$measuresIds:Ljava/util/List;


# direct methods
.method constructor <init>(Ljava/util/List;)V
    .locals 0

    .line 140
    iput-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$8;->val$measuresIds:Ljava/util/List;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 1

    .line 144
    :try_start_0
    iget-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$8;->val$measuresIds:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result p2

    if-eqz p2, :cond_0

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object p2

    check-cast p2, Ljava/lang/Integer;

    invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I

    move-result p2

    .line 145
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->getCurrentFragment()Landroidx/fragment/app/Fragment;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/views/FragmentMeasuresList;

    invoke-virtual {v0, p2}, Llt/noframe/gpsfarmguide/views/FragmentMeasuresList;->removeItem(I)V

    .line 146
    invoke-static {}, Llt/noframe/gpsfarmguide/database/DB;->getDB()Llt/noframe/gpsfarmguide/database/DB;

    move-result-object v0

    invoke-virtual {v0, p2}, Llt/noframe/gpsfarmguide/database/DB;->deleteArea(I)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 149
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    .line 151
    :cond_0
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    check-cast p1, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->getCurrentFragment()Landroidx/fragment/app/Fragment;

    move-result-object p1

    check-cast p1, Llt/noframe/gpsfarmguide/views/FragmentMeasuresList;

    const/4 p2, 0x0

    const/4 v0, -0x1

    invoke-virtual {p1, p2, v0}, Llt/noframe/gpsfarmguide/views/FragmentMeasuresList;->setSelection(ZI)V

    return-void
.end method
